<%= turbo_frame_tag "new_address_#{params[:type]}" do %>
  <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @address } %>

  <%= form_for [:admin, @address], as: :address, url: spree.admin_addresses_path, method: :post, data: { turbo_frame: '_top' } do |f| %>
    <%= render 'spree/addresses/form',
      address_name: 'address',
      address_form: f,
      address_type: 'shipping',
      address: @address %>
    <%= hidden_field_tag :user_id, params[:user_id] %>
    <%= hidden_field_tag :default_shipping, params[:default_shipping] %>
    <%= hidden_field_tag :default_billing, params[:default_billing] %>

    <%= render 'spree/admin/shared/new_resource_links', f: f %>
  <% end %>
<% end %>